<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')
			uni.getStorage({
				key: 'token',
				success(res) {
					console.log(res, "获取到了")
					if (res.data == "") {
						uni.reLaunch({
							url: "/pages/login/login"
						})
					}
					// else{
					// 	uni.reLaunch({
					// 		url:"/pages/homepage/homepage"
					// 	})
					// }
				},
				fail(err) {
					console.log(err, "错误信息")
					uni.reLaunch({
						url: "/pages/login/login"
					})
				}
			});
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
	@import "uview-ui/index.scss";
	@import url("static/css/main.css");
	@import url("static/css/item.css");
</style>
